package o;

import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bumptech.glide.Glide;
import com.bumptech.glide.Glide.d;
import com.huawei.hms.framework.network.restclient.hwhttp.dns.DnsConfig;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import o.uj.b;
import o.yt.e;

public final class ri {
    private uv ʻ;
    private int ʻॱ = DnsConfig.MAX_CACHE_ENTRIES;
    private yi ʼ;
    private uv ʽ;
    private ud ˊ;
    private boolean ˊॱ;
    private final Map<Class<?>, rq<?, ?>> ˋ = new ds();
    private int ˋॱ = 4;
    private uc ˎ;
    private to ˏ;
    private d ˏॱ = new d(this) {
        final /* synthetic */ ri ॱ;

        {
            this.ॱ = r1;
        }

        @NonNull
        public zp ˎ() {
            return new zp();
        }
    };
    private uv ͺ;
    private ut ॱ;
    @Nullable
    private e ॱˊ;
    private boolean ॱˋ;
    private int ॱˎ = 700;
    private ux ॱॱ;
    @Nullable
    private List<zn<Object>> ॱᐝ;
    private b ᐝ;
    private boolean ᐝॱ;

    @NonNull
    public ri ˊ(@Nullable uc ucVar) {
        this.ˎ = ucVar;
        return this;
    }

    @NonNull
    public ri ˏ(@Nullable ut utVar) {
        this.ॱ = utVar;
        return this;
    }

    @NonNull
    public ri ˋ(@Nullable b bVar) {
        this.ᐝ = bVar;
        return this;
    }

    @NonNull
    public ri ˊ(@Nullable uv uvVar) {
        this.ʽ = uvVar;
        return this;
    }

    @NonNull
    public ri ˊ(@Nullable zp zpVar) {
        return ॱ(new 1(this, zpVar));
    }

    @NonNull
    public ri ॱ(@NonNull d dVar) {
        this.ˏॱ = (d) aas.ˎ(dVar);
        return this;
    }

    public void ˊ(@Nullable e eVar) {
        this.ॱˊ = eVar;
    }

    @NonNull
    public Glide ˎ(@NonNull Context context) {
        if (this.ʽ == null) {
            this.ʽ = uv.ˏ();
        }
        if (this.ʻ == null) {
            this.ʻ = uv.ॱ();
        }
        if (this.ͺ == null) {
            this.ͺ = uv.ˋ();
        }
        if (this.ॱॱ == null) {
            this.ॱॱ = new ux.e(context).ˊ();
        }
        if (this.ʼ == null) {
            this.ʼ = new yl();
        }
        if (this.ˎ == null) {
            int ˎ = this.ॱॱ.ˎ();
            if (ˎ > 0) {
                this.ˎ = new uk((long) ˎ);
            } else {
                this.ˎ = new ug();
            }
        }
        if (this.ˊ == null) {
            this.ˊ = new uf(this.ॱॱ.ˋ());
        }
        if (this.ॱ == null) {
            this.ॱ = new uu((long) this.ॱॱ.ˏ());
        }
        if (this.ᐝ == null) {
            this.ᐝ = new uq(context);
        }
        if (this.ˏ == null) {
            this.ˏ = new to(this.ॱ, this.ᐝ, this.ʻ, this.ʽ, uv.ˎ(), this.ͺ, this.ˊॱ);
        }
        if (this.ॱᐝ == null) {
            this.ॱᐝ = Collections.emptyList();
        } else {
            this.ॱᐝ = Collections.unmodifiableList(this.ॱᐝ);
        }
        return new Glide(context, this.ˏ, this.ॱ, this.ˎ, this.ˊ, new yt(this.ॱˊ), this.ʼ, this.ˋॱ, this.ˏॱ, this.ˋ, this.ॱᐝ, this.ᐝॱ, this.ॱˋ, this.ॱˎ, this.ʻॱ);
    }
}
